package com.example.a02back.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.a02back.dto.*;
import com.example.a02back.entity.Trade;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author SimpChaos
 * @since 2022-07-11
 */
public interface ITradeService extends IService<Trade> {
    String publish(String uid,String sid,String title,String info,Integer type,Integer tradeType,String deadline,Integer price);
    String publishImage(MultipartFile file, String uid, String sid) throws IOException;
    TradeDetail getOne(String rid);
    List<ListDetail> getWantList(Long decode);
    List<ListDetail> getSellList(Long decode,Integer type);
    MyDoneList getMyDone(Long decode, String uid);
    MyDoneList getMyPublish(Long decode,String uid);
    MyDoneList getMyBuy(Long decode,String uid);
    List<MyDone> getFavItemList(List<String> list,Integer type);
    String update(String sid,String title,String info,Integer type,String deadline,Integer price);
    String delete(String sid);
    String updateImg(MultipartFile file,Integer number,String uid,String sid) throws IOException;
    String accepcTrade(String swapper,String sid);
    String cancelTrade(String sid);
    List<Trade> searchByKeyword(String keyword);


}
